import http from '@/http/index'

export async function list() {
  const res = await http({
    method: 'GET',
    path: '/api/roles-menu-relations',
    params: {}
  })
  return res
}
export async function save(params: any) {
  const res = await http({
    method: 'POST',
    path: '/api/roles-menu-relations',
    params,
  })
  return res
}

export async function deleteByRoleId(role_id: number) {
  const res = await http({
    method: 'DELETE',
    path: '/api/roles-menu-relations/role-id',
    params: {
      role_id
    }
  })
  return res
}